Convolutions with various kernels

15.6 μs
219 ms
57.0 ns
kernel
21×21 OffsetArray(::Array{Float64,2}, -10:10, -10:10) with eltype Float64 with indices -10:10×-10:10:
 0.000125322  0.000183256  0.000257465  …  0.000257465  0.000183256  0.000125322
 0.000183256  0.000267973  0.000376488     0.000376488  0.000267973  0.000183256
 0.000257465  0.000376488  0.000528946     0.000528946  0.000376488  0.000257465
 0.000347542  0.000508205  0.000714002     0.000714002  0.000508205  0.000347542
 0.000450738  0.000659107  0.000926011     0.000926011  0.000659107  0.000450738
 0.000561654  0.000821298  0.00115388   …  0.00115388   0.000821298  0.000561654
 0.000672422  0.000983272  0.00138145      0.00138145   0.000983272  0.000672422
 ⋮                                      ⋱                            ⋮
 0.000561654  0.000821298  0.00115388   …  0.00115388   0.000821298  0.000561654
 0.000450738  0.000659107  0.000926011     0.000926011  0.000659107  0.000450738
 0.000347542  0.000508205  0.000714002     0.000714002  0.000508205  0.000347542
 0.000257465  0.000376488  0.000528946     0.000528946  0.000376488  0.000257465
 0.000183256  0.000267973  0.000376488     0.000376488  0.000267973  0.000183256
 0.000125322  0.000183256  0.000257465  …  0.000257465  0.000183256  0.000125322
34.3 μs
11.0 μs
1.0000000000000002
412 ns
75.0 ns
162 ms
conv_image
8.6 s
129 ms
K
3×3 OffsetArray(::Array{Float64,2}, -1:1, -1:1) with eltype Float64 with indices -1:1×-1:1:
 -0.5  -1.0  -0.5
 -1.0   7.0  -1.0
 -0.5  -1.0  -0.5
2.4 μs
7.9 μs
conv_image_2
624 ms
edge_kernel
3×3 OffsetArray(::Array{Float64,2}, -1:1, -1:1) with eltype Float64 with indices -1:1×-1:1:
 -0.125  -0.25  -0.125
  0.0     0.0    0.0
  0.125   0.25   0.125
13.9 μs
3.5 μs
conv_image_3
504 ms
165 ns
94.8 ms
img
656 ms
116 ms
278 ns
441 ns
1.5 ms
2.7 s
920 ms
10.6 s
1.4 s

Function definitions

4.4 μs
749 μs
show_colored_kernel (generic function with 1 method)
64.8 μs
decimate (generic function with 2 methods)
71.6 μs
shrink_image (generic function with 2 methods)
133 μs
rgb_to_float (generic function with 1 method)
25.9 μs
fourier_spectrum_magnitudes (generic function with 1 method)
44.1 μs
plot_1d_fourier_spectrum (generic function with 2 methods)
44.1 μs
heatmap_2d_fourier_spectrum (generic function with 1 method)
28.5 μs
clamp_at_boundary (generic function with 1 method)
35.3 μs
rolloff_boundary (generic function with 1 method)
39.1 μs
convolve (generic function with 2 methods)
163 μs
box_blur (generic function with 1 method)
74.1 μs
gauss_blur (generic function with 2 methods)
34.0 μs